﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin_ProductOrder.aspx.cs"
    Inherits="V5_EShop.Admin.Admin_ProductOrder" MasterPageFile="~/Admin/admin.Master"%>
<asp:Content ID="Content1" ContentPlaceHolderID="Header" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="server">产品订单管理
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Nav" runat="server"><a href="Admin_ProductOrder.aspx">产品订单</a>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Content" runat="server">
    <asp:MultiView ID="MultiViewList" runat="server">
        <asp:View ID="View1" runat="server">
            <asp:GridView ID="gvList" runat="server" AutoGenerateColumns="False" CssClass="tablelist tableheader overlist"
                GridLines="None" OnRowCommand="gvList_RowCommand">
                <HeaderStyle CssClass="headertext" />
                <Columns>
                    <asp:BoundField DataField="OrderID" HeaderText="选择" />
                    <asp:BoundField HeaderText="单号" DataField="OrderNo" />
                    <asp:BoundField HeaderText="下订时间" DataField="OrderTime" />
                    <asp:BoundField HeaderText="货品总额" DataField="ProductPrice" />
                    <asp:BoundField HeaderText="运费" DataField="ShipPrice" />
                    <asp:BoundField HeaderText="总金额" DataField="TotalPrice" />
                    <asp:BoundField HeaderText="预付款" DataField="AdvancePayment" />
                    <asp:BoundField HeaderText="实际应付款" DataField="OrderID" />
                    <asp:TemplateField HeaderText="支付方式">
                        <ItemTemplate>
                            <%#this.Get_ProductOrder_Pay( DataBinder.Eval(Container.DataItem, "PaymentType"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                     <asp:TemplateField HeaderText="配送方式">
                        <ItemTemplate>
                            <%#this.Get_ProductOrder_Send(DataBinder.Eval(Container.DataItem, "ShippingType"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="收货人" DataField="ReceiverName" />
                    <asp:BoundField HeaderText="联系电话" DataField="ReceiverPhone" />
                    <asp:TemplateField HeaderText="订单状态">
                        <ItemTemplate>
                            <%#DataBinder.Eval(Container.DataItem, "OrderID")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:LinkButton ID="Button1" runat="server" Text="管理" CommandArgument='<%#Bind("OrderID")%>'
                                CommandName="view" />
                            <asp:LinkButton ID="Button2" runat="server" Text="删除" CommandArgument='<%#Bind("OrderID")%>'
                                CommandName="del" />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <webdiyer:AspNetPager ID="Pager" runat="server" AlwaysShow="True" CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页，每页%PageSize%条"
                FirstPageText="首页" HorizontalAlign="Right" LastPageText="尾页" NextPageText="下一页"
                OnPageChanged="Pager_PageChanged" PageIndexBoxType="DropDownList" PageSize="20"
                PrevPageText="上一页" ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText="Go"
                TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" Width="100%">
            </webdiyer:AspNetPager>
        </asp:View>
        <asp:View ID="View2" runat="server">
            <table cellpadding="5" cellspacing="1" class="tablelist tableheader">
                <tr>
                    <td colspan="2" class="headertext">
                        产品信息
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <table cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    产品名称
                                </td>
                                <td>
                                    产品规格
                                </td>
                                <td>
                                    产品价格
                                </td>
                                <td>
                                    产品数量
                                </td>
                                <td>
                                    产品积分
                                </td>
                            </tr>
                            <%
                                this.Bind_OrderProduct(m_productorder.OrderNo);
                           %>
                            <asp:Repeater ID="rpProductList" runat="server">
                                <ItemTemplate>
                                    <tr>
                                        <td>
                                            <a href="${url.index}product-details-<%#DataBinder.Eval(Container.DataItem,"pid")%>.aspx" target="_blank">
                                                <%#DataBinder.Eval(Container.DataItem, "proname")%></a>
                                        </td>
                                        <td>
                                            <%#DataBinder.Eval(Container.DataItem, "profieldvalues")%>
                                        </td>
                                        <td>
                                            <%#DataBinder.Eval(Container.DataItem, "promemberprice")%>
                                        </td>
                                        <td>
                                            <%#DataBinder.Eval(Container.DataItem, "proquantity")%>
                                        </td>
                                        <td>
                                            <%#DataBinder.Eval(Container.DataItem, "proscore")%>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        订单信息
                    </td>
                </tr>
                <tr>
                    <td style="width: 15%;">
                    </td>
                    <td>
                        <table cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    订单号码：${ m_productorder.OrderNo}下单日期：${ m_productorder.OrderTime}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    订单状态：
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    配送方式：<asp:Label ID="lblSendStatus" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    支付方式：<asp:Label ID="lblPayStauts" runat="server"></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        购货人信息
                    </td>
                </tr>
                <tr>
                    <td style="width: 15%;">
                    </td>
                    <td>
                        <table cellpadding="0" cellspacing="0">
                            <tr>
                                <td style="width: 25%;">
                                    购货人姓名：
                                </td>
                                <td>
                                    ${ m_productorder.BuyerName%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    用户名：
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    联系电话：
                                </td>
                                <td>
                                    ${ m_productorder.BuyerPhone}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Email地址：
                                </td>
                                <td>
                                    ${ m_productorder.BuyerEmail}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    购货人地址：
                                </td>
                                <td>
                                    ${ m_productorder.BuyerAddress}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    邮政编码：
                                </td>
                                <td>
                                    ${ m_productorder.BuyerPostalcode}
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        收货人信息
                    </td>
                </tr>
                <tr>
                    <td style="width: 15%;">
                    </td>
                    <td>
                        <table cellpadding="0" cellspacing="0" style="width: 80%;">
                            <tr>
                                <td style="width: 25%;">
                                    收货人姓名：
                                </td>
                                <td>
                                    ${ m_productorder.ReceiverName}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    联系电话：
                                </td>
                                <td>
                                    ${ m_productorder.ReceiverPhone}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Email地址：
                                </td>
                                <td>
                                    ${ m_productorder.ReceiverEmail}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    收货人地址：
                                </td>
                                <td>
                                    ${ m_productorder.ReceiverAddress}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    邮政编码：
                                </td>
                                <td>
                                    ${ m_productorder.ReceiverPostalcode}
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        订单留言
                    </td>
                </tr>
                <tr>
                    <td style="width: 15%;">
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        发票信息
                    </td>
                </tr>
                <tr>
                    <td style="width: 15%;">
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        修改订单状态
                    </td>
                </tr>
                <tr>
                    <td style="width: 15%;">
                    </td>
                    <td>
                        <asp:CheckBox ID="cb1" runat="server" Text="是否已确认" />
                        <asp:CheckBox ID="cb2" runat="server" Text="是否已付款" />
                        <asp:CheckBox ID="cb3" runat="server" Text="是否已发货" />
                        <asp:CheckBox ID="cb4" runat="server" Text="是否已归档" />
                        <asp:CheckBox ID="cb5" runat="server" Text="是否取消该订单" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <asp:Button ID="btnSave" runat="server" Text="保存" />
                        &nbsp;<input id="Button1" type="button" value="打印" />
                        <asp:HiddenField ID="hfID" runat="server" Value="0" />
                    </td>
                </tr>
            </table>
        </asp:View>
    </asp:MultiView>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Footer" runat="server">
</asp:Content>